package com.bole.dao;

import com.bole.pojo.TbUserDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;
import java.util.List;

@Transactional
public interface UserDao extends JpaRepository<TbUserDo,Long> {
    @Query("from TbUserDo where telephone = ?1")
    TbUserDo getUserByTelephone(String telephone);

    List<TbUserDo> findAllByTelephone(String telephone);
}
